/*
 * @Copyright: All rights reserved. Please Contact the Email sagittar_zhang@126.com
 */

package cn.guet.base.spider;

import lombok.Getter;

/**
 * 固定值
 *
 * @author SAGITTAR
 */
public class Constants {

    /**
     * 默认超时时间
     */
    public final static int TIMEOUT = 10000;

    /**
     * 单个IP请求间隔，单位ms
     */
    public final static long TIME_INTERVAL = 1000;

    /**
     * 浏览器设置
     */
    public final static String[] USER_AGENT_ARRAY = new String[] {
        "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36",
        "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2623.110 Safari/537.36",
        "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2623.110 Safari/537.36",
        "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2623.110 Safari/537.36",
        "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2623.110 Safari/537.36",
        "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2623.110 Safari/537.36",
        "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2623.110 Safari/537.36",
        "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2623.110 Safari/537.36",
        "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0",
        "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36" };

    private Constants() {
        throw new AssertionError();
    }

    /**
     * 访问类型
     */
    public enum VisitedType {
        /**
         * direct
         */
        DIRECT("direct"),
        /**
         * proxy
         */
        PROXY("proxy");

        @Getter
        private final String description;

        VisitedType(String description) {
            this.description = description;
        }
    }
}
